<?php
use Illuminate\Support\Facades\Route;
use Plugin\Consult\Controllers\ConsultController;
$adminName = admin_name();
Route::middleware('can:consult_index')->get('/consult', [ConsultController::class, 'index'])->name('consult.index');
Route::middleware(['admin'])
    ->name("{$adminName}.")
    ->group(function () {
    Route::middleware('admin_auth:' . \Beike\Models\AdminUser::AUTH_GUARD)
            ->group(function () {
        Route::get('consult_lang', [ConsultController::class, 'consult_lang'])->name('consult_lang.index');
        Route::any('consult_dialogue', [ConsultController::class, 'consult_dialogue'])->name('consult_dialogue.index');
        Route::any('consult_verbal', [ConsultController::class, 'consult_verbal'])->name('consult_verbal.index');
        Route::any('consult_service', [ConsultController::class, 'consult_service'])->name('consult_service.index');
        Route::any('consult_setting', [ConsultController::class, 'consult_setting'])->name('consult_setting.index');
        Route::any('consult_batch_translate', [ConsultController::class, 'consult_batch_translate'])->name('consult_batch_translate.index');
        Route::get('consult_goods', [ConsultController::class, 'consult_goods'])->name('consult_goods.index');
        Route::get('consult_order', [ConsultController::class, 'consult_order'])->name('consult_order.index');
        Route::get('consult_footprint', [ConsultController::class, 'consult_footprint'])->name('consult_footprint.index');
        Route::any('consult_history', [ConsultController::class, 'consult_history'])->name('consult_history.index');
        Route::any('consult_transfer', [ConsultController::class, 'consult_transfer'])->name('consult_transfer.index');
        Route::any('consult_switch_translate', [ConsultController::class, 'consult_switch_translate'])->name('consult_switch_translate.index');
        Route::any('consult_ping', [ConsultController::class, 'consult_ping'])->name('consult_ping.index');
    });
});